<%@ page contentType="text/html;charset=iso8859_1" language="java" %>

<jsp:useBean id="oLogon" class="git.bankview.wl.bean.LogonBean" scope="session" />
<% oLogon.setLogon(false); %>
<jsp:setProperty name="oLogon" property="username" />
<jsp:setProperty name="oLogon" property="remoteHost" value="<%=request.getRemoteAddr()%>" />
<jsp:useBean id="doUsers" scope="page" class="git.bankview.wl.auth.userGroups.UsersBean"/>
<jsp:setProperty name="doUsers" property="requestObj" value="<%=request %>" />
<%
	String pwd = request.getParameter("password");
	try
	{
		doUsers.loginCheck(oLogon.getUsername(), pwd);
		oLogon.setLogon(true);
		oLogon.writeJournal("LOGIN", "OK");
%><script>parent.<%=request.getParameter("successCallback")%>();</script><%
	}
	catch(git.bankview.wl.auth.AuthentificationException e)	
	{
		oLogon.setLogon(false);
		oLogon.writeJournal("LOGIN", "FAILED - " + e.getMessage());
%><script>parent.<%=request.getParameter("failCallback")%>("<bean:message key="<%=e.getMessageKey()%>" />");</script><%
	}
%>

